package com.chentf.behavioral.responsibilitychain.code.demo02;

/**
 * 具体解决问题的类：只要问题的编号是奇数，就可以解决
 */
public class OddSupport extends Support {
    /**
     * 构造函数
     * @param name
     */
    public OddSupport(String name) {
        super(name);
    }
    protected boolean resolve(Trouble trouble) {
        if (trouble.getNumber() % 2 == 1) {
            return true;
        } else {
            return false;
        }
    }
}
